//package jse;
//
//import javax.sql.DataSource;
//
//import org.beetl.ext.spring.BeetlGroupUtilConfiguration;
//import org.springframework.cache.CacheManager;
//import org.springframework.cache.caffeine.CaffeineCacheManager;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.jdbc.core.JdbcTemplate;
//
//import com.zaxxer.hikari.HikariConfig;
//import com.zaxxer.hikari.HikariDataSource;
//
//import jdk.nashorn.api.scripting.NashornScriptEngine;
//import jdk.nashorn.api.scripting.NashornScriptEngineFactory;
//import jse.dao.Dao;
//
//@Configuration
//@ComponentScan(basePackages = "jse")
//public class AppConfig {
//@Bean(initMethod="init") public BeetlGroupUtilConfiguration beetlConfig() {return new BeetlGroupUtilConfiguration();}
//   
//    @Bean public DataSource dataSource() {
//    	HikariConfig config = new HikariConfig("/jdbc.properties");
//    	HikariDataSource ds = new HikariDataSource(config);
//    	return ds;
//    }
//    
//    @Bean public CacheManager cacheManager() {return new CaffeineCacheManager();}
//    
//    @Bean public JdbcTemplate jdbcTemplate() {return new JdbcTemplate(dataSource());}
//    
//    @Bean public NashornScriptEngineFactory nashornFactory() {return new NashornScriptEngineFactory();}
//    @Bean public NashornScriptEngine scriptEngine() {
//    	return (NashornScriptEngine) nashornFactory().getScriptEngine("--language=es6","--optimistic-types=[true]");
//    }
//}
